<%-- 
    Document   : apply
    Created on : 2017-1-4, 16:05:07
    Author     : 52461
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="../../link.jsp" %>
<!DOCTYPE html>
<head>
    <link rel="stylesheet" type="text/css" href="${base}/css/jquery.datetimepicker.css">
    <link rel="stylesheet" type="text/css" href="${base}/css/jquery-ui-1.10.3.custom.min.css">
    <!--<link href="${base}/css/layui.css" rel="stylesheet">-->
    <link href="${base}/css/paper_edit.css" rel="stylesheet">
    <link href="${base}/css/font-awesome.css" rel="stylesheet">
    <link href="${base}/css/nprogress.css" rel="stylesheet">
    <script type="text/javascript" src="${base}/js/jquery-1.9.1.js"></script>
    <script type="text/javascript" src="${base}/js/jquery-ui-1.10.3.custom.min.js"></script>
    <script type="text/javascript" src="${base}/js/jquery.datetimepicker.full.min.js"></script>
    <script type="text/javascript" src="${base}/js/angular/angular.min.js"></script>
    <script type="text/javascript" src="${base}/js/nprogress.js"></script>
    <script type="text/javascript" src="${base}/js/jquery.cxhd.js"></script>
    <script type="text/javascript" src="${base}/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="${base}/js/angular-base.js"></script>
    <script type="text/javascript" src="${base}/js/nprogress.js"></script>
    <script type="text/javascript" src="${base}/view/ask/apply.js"></script>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>区域一体化医学远程会诊申请单</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body {
            width: 1000px;
            margin: 10px auto;
            font-family: "微软雅黑";
        }
        ul,li{
            list-style-type:none;
        }

        .apply {
            width: 100%;
        }

        .apply td {
            padding: 5px 0;
            font-size: 16px;
        }

        .apply .a_title {
            text-align: center;
            font-size: 24px;
            padding: 20px 0;
            font-weight: 600;
        }

        .apply td input {
            font-size: 16px;
            font-family: "微软雅黑";
            width: 110px;
            height: 20px;
            padding: 3px 5px;
            border: 1px #ccc solid;
            border-top: none;
            border-left: none;
            border-right: none;
            outline: none;
        }

        .apply td select {
            width: 110px;
            font-size: 14px;
            font-family: "微软雅黑";
            height: 25px;
            padding: 0px 5px;
            border: 1px #ccc solid;
            border-top: none;
            border-left: none;
            border-right: none;
            outline: none;
        }

        .apply td .w_30 {
            width: 20px;
            height: 13px;
            border: 1px #ccc solid;
        }

        .apply td label {
            margin: 0 10px;
        }

        .apply td .choice {
            width: 15px;
            height: 15px;
            vertical-align: middle;
        }

        .apply td textarea {
            height: 100px;
            border: none;
            outline: none;
        }

        .content {
            width: 98%;
            margin: 0 auto;
            border-top: 1px #999 solid;
            border-left: 1px #999 solid;
        }

        .content td {
            padding: 5px;
            text-align: center;
            border-right: 1px #999 solid;
            border-bottom: 1px #999 solid;
        }

        .content td input {
            border: none;
            outline: none;
        }
        .floatUl:after{
            content:" ";
            height:0;
            display:block;
            clear:both;
        }
        .floatUl li{
            float:left;
            position:relative;
            margin-right:15px;
            cursor:pointer;
        }

        .floatUl li div:first-child{
            position:absolute;
            left:0;
            top:0;
            width:100%;
            height:100%;
            z-index:11;
        }

    </style>

</head>

<body ng-app="apply" ng-controller="mainCtrl">
    <div id="head" style="position: fixed;top: 0;left: 0;height: 50px;width: 100%">

        <div class="panel panel-default">
            <div class="panel-heading">
                <div class="container">
                    <!--                    <button style="float: right;margin-left: 10px;" class="btn btn-success btn-sm" onclick="rptCache()"><span class="fa fa-save"></span>&nbsp;&nbsp;缓存报告</button>
                                        <button style="float: right;margin-left: 10px; display: none" class="btn btn-success btn-sm getcache" onclick="showCache()"><span class="fa fa-save"></span>&nbsp;&nbsp;提取缓存</button>-->

                    <button ng-hide="saveFlag" style="float: right;margin-left: 10px;" class="btn btn-success btn-sm" ng-click="saveApply()"><span class="fa fa-save"></span>&nbsp;&nbsp;保存</button>
                    <button style="float: right;margin-left: 10px;" class="btn btn-primary btn-sm" onclick="printRpt()"><span class="fa fa-save"></span>&nbsp;&nbsp;打印</button> &nbsp;&nbsp;&nbsp;&nbsp;

                    <div style="clear: both"></div>
                </div>
            </div>
        </div>

    </div>
    <div  id="rpt" style="margin-top: 80px">
        <table cellpadding="0" cellspacing="0" class="apply">
            <tr>
                <td colspan="2" align="left"><img src="${base}/images/code.jpg" width="80" /></td>
                <td colspan="4" class="a_title">区域一体化医学远程会诊申请单</td>
                <td colspan="2" align="right"><img src="${base}/images/code_2.jpg" width="180" /></td>
            </tr>
            <tr style=" border-bottom:1px #ccc solid; padding-bottom:5px;">
                <td align="left" colspan="3">会诊编号：
                    <input class="create_x" ng-model="info.ask_code" type="text" style=" width:150px; border:none;" />
                </td>
                <td align="left" colspan="3">会诊类型：
                    <select ng-model="info.hz_type" style=" width: 120px; height:25px; padding: 0; border: none">
                        <option>县乡普通会诊</option>
                        <option>县乡急会诊</option>
                        <option>院内普通会诊</option>
                        <option>院内急会诊</option>
                        <option>省市普通会诊</option>
                        <option>省市急会诊</option>
                    </select>
                </td>
                <td align="right" colspan="2" >申请日期：
                    <input class="create_x" ng-model="info.apply_date" type="text" id="nowDate" style=" width:150px; border:none;"/>
                </td>
            </tr>
            <tr>
                <td colspan="8">
                    <table cellpadding="0" cellspacing="0" width="100%" style=" padding:10px 0; border-top:2px #666 solid; border-bottom:2px #666 solid;">
                        <tr>
                            <td align="right">患者姓名：</td>
                            <td align="left">
                                <input class="create_x" ng-model="info.name" type="text" />
                            </td>
                            <td align="right">性 别：</td>
                            <td align="left">
                                <input class="create_x" ng-model="info.sex" type="text" onclick="autoClass(this, ['男性', '女性', '不确定'])" />
                            </td>
                            <td align="right">年 龄：</td>
                            <td align="left">
                                <input class="create_x" ng-model="info.age" type="text" />
                            </td>
                            <td align="right">联系电话：</td>
                            <td align="left">
                                <input class="create_x" ng-model="info.phone" type="text" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right">住院/门诊号：</td>
                            <td align="left">
                                <input class="create_x" ng-model="info.info_id" type="text" />
                            </td>
                            <td align="right">住院次数：</td>
                            <td align="left">
                                <input class="create_x" ng-model="info.zy_days" type="text" />
                            </td>
                            <td align="right">来诊日期：</td>
                            <td align="left">
                                <input class="create_x" ng-model="info.hz_date" type="text" onmouseover="getDate(this)" />
                            </td>
                            <td align="right">付费类型：</td>
                            <td align="left">
                                <select class="create_x" ng-model="info.fy_type" style=" height:25px; width:105px;">
                                    <option>自费</option>
                                    <option>新农合</option>
                                    <option>城镇医保</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">家庭住址：</td>
                            <td colspan="5">
                                <input class="create_x" type="text" ng-model="info.address" style=" width:620px;" />
                            </td>
                            <td align="right">民 族：</td>
                            <td align="left">
                                <input class="create_x" ng-model="info.min_zu" type="text"  onclick="autoClass(this, ['汉族', '满族', '壮族', '回族', '彝族', '蒙古族', '藏族', '布依族', '侗族', '瑶族', '朝鲜族', '白族', '苗族', '维吾尔族', '土家族', '哈尼族', '哈萨克族', '黎族', '傣族', '畲族', '傈僳族', '仡佬族', '东乡族', '高山族', '拉祜族', '水族', '佤族', '纳西族', '羌族', '土族', '仫佬族', '锡伯族', '柯尔克孜族', '达斡尔族', '景颇族', '毛南族', '撒拉族', '布朗族', '塔吉克族', '阿昌族', '普米族', '鄂温克族', '怒族', '京族', '基诺族', '德昂族', '保安族', '俄罗斯族', '裕固族', '乌兹别克族', '门巴族', '独龙族', '塔塔尔族', '赫哲族', '珞巴族'])"/>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">过敏药物或食物：</td>
                            <td colspan="5">
                                <input class="create_x" ng-model="info.guo_min" type="text" style=" width:620px; border:none;" />
                            </td>
                            <td align="right">职 业：</td>
                            <td align="left">
                                <input class="create_x" ng-model="info.position" type="text" style=" border:none;" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="8">
                                <table cellpadding="0" cellspacing="0" class="content">
                                    <tr>
                                        <td align="right"  >申请医院：</td>
                                        <td align="left">
                                            <input class="create_x" ng-model="info.hospital" type="text" />
                                        </td>
                                        <td align="right">申请科室：</td>
                                        <td align="left">
                                            <input class="create_x" ng-model="info.apply_department" type="text" />
                                        </td>
                                        <td align="right">主管医师：</td>
                                        <td align="left">
                                            <input class="create_x" type="text" ng-model="info.main_doctor" />
                                        </td>
                                        <td align="right">医生电话：</td>
                                        <td align="left">
                                            <input class="create_x" ng-model="info.main_doctor_phone"  type="text" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">邀请医院：</td>
                                        <td align="left">
                                            <input class="create_x" ng-model="info.invite_hospital" type="text" />
                                        </td>
                                        <td align="right">邀请科室：</td>
                                        <td align="left">
                                            <input class="create_x" ng-model="info.invite_department" type="text" />
                                        </td>
                                        <td align="right">会诊专家：</td>
                                        <td align="left">
                                            <input ng-click="openDoctorM()" class="create_x manager_x" ng-model="info.recvicer_name" type="text" />
                                        </td>
                                        <td align="right">专家电话：</td>
                                        <td align="left">
                                            <input class="create_x manager_x" ng-model="info.recvicer_phone" type="text" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">会诊时间：</td>
                                        <td align="left" colspan="7" style=" text-align: left;">
                                            <input class="create_x manager_x" onmouseover="getDate(this)"  ng-model="info.appointment_time" type="text" style=" width:400px;" />

                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">会诊地点：</td>
                                        <td align="left" colspan="7" style=" text-align: left;">
                                            <input class="create_x"  ng-model="info.ke" type="text" style=" width:400px;" />科
                                            <input class="create_x" ng-model="info.bingfang" type="text" style=" width:60px;" />病房
                                            <input class="create_x" ng-model="info.loufang" type="text" style=" width:60px;" />楼
                                            <input class="create_x" ng-model="info.fang" type="text" style=" width:60px;" />房
                                            <input class="create_x" ng-model="info.bed" type="text" style=" width:60px;" />床位
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">疾病ICD：</td>
                                        <td colspan="3">
                                            <input class="create_x" type="text" ng-model="info.ICD" style=" border-bottom:none; outline:none; width:350px;" />
                                        </td>
                                        <td align="right">疾病情况：</td>
                                        <td colspan="3">
                                            <div>
                                                <ul class="floatUl">
                                                    <li>

                                                        <input type="radio" ng-model="info.disease_situation" class="choice" name="disease_situation" /> <span>一般</span>
                                                    </li>
                                                    <li>

                                                        <input type="radio" ng-model="info.disease_situation" class="choice" name="disease_situation" /> <span>疑难</span>
                                                    </li>
                                                    <li>

                                                        <input type="radio" ng-model="info.disease_situation" class="choice" name="disease_situation" /> <span>危急</span>
                                                    </li>
                                                </ul>
                                            </div>

                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">初步诊断：</td>
                                        <td colspan="7">
                                            <textarea  ng-model="info.first_diagnosis" cols="100" class="diagnosis create_x"></textarea>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">主诉：</td>
                                        <td colspan="7">
                                            <textarea ng-model="info.main_diagnosis" cols="100" class="diagnosis create_x"></textarea>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">现病史：</td>
                                        <td colspan="7">
                                            <textarea ng-model="info.now_doc" cols="100" class="diagnosis create_x"></textarea>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">体格检查：</td>
                                        <td colspan="7">
                                            <textarea ng-model="info.body_check" cols="100" class="diagnosis create_x"></textarea>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">检查项目</br>影像/检验：</td>
                                        <td colspan="7">
                                            <textarea ng-model="info.pacs_info" cols="100" class="diagnosis create_x"></textarea>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">会诊目的</br>/要求：</td>
                                        <td colspan="7">
                                            <textarea ng-model="info.mudi" cols="100" class="diagnosis create_x"></textarea>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="8">
                                <label>处方/医嘱：
                                    <input   type="hidden" class="w_30" />
                                    <input ng-model="info.yizhu_count" type="text" class="w_30 create_x " ng-click="openYZ('医嘱', 'yizhu')" />
                                </label>
                                <label>病历记录：

                                    <input  ng-model="info.bingli_count" type="text" class="w_30" ng-click="openYZ('病历', 'bingli')" />
                                </label>
                                <label>影像检查：
                                    <input   type="hidden" class="w_30" />
                                    <input ng-model="info.pacs_count" type="text" class="w_30" ng-click="openYZ('pacs', 'pacs')"  />
                                </label>
                                <label>检验报告：
                                    <input   type="hidden" class="w_30" />
                                    <input ng-model="info.lis_count" type="text" class="w_30" ng-click="openYZ('检验', 'lis')" />
                                </label>
                                <label>护理记录：
                                    <input   type="hidden" class="w_30" />
                                    <input ng-model="info.huli_count" type="text" class="w_30" ng-click="openYZ('护理', 'huli')" />
                                </label>
                                <label>健康档案：
                                    <input  type="hidden" class="w_30" />
                                    <input ng-model="info.health_doc_count" type="text" class="w_30" ng-click="openYZ('健康档案', 'health_doc')"  />
                                </label>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="2">计价：
                    <input type="text" style=" border:none;" />
                </td>
                <td colspan="2">申请医师签名：
                    <input type="text" style=" border:none;" />
                </td>
                <td colspan="2">病人/家属：
                    <input type="text" style=" border:none;" />
                </td>
                <td align="right" colspan="2">中心工作人员：
                    <input type="text" style=" border:none;" />
                </td>
            </tr>
            <tr>
                <td colspan="8" align="center" style=" font-size: 14px; border-top:1px #ccc solid; padding-top:10px;">版权所有 违者必究 © 2016深圳绰曦互动科技有限公司 www.tronsystem.com</td>
            </tr>
        </table>
    </div>

    <div class="modal fade mode-info " role="dialog" aria-labelledby="gridSystemModalLabel">
        <div class="modal-dialog  modal-lg " role="document">
            <div class="modal-content">
                <div class="modal-header">
                    信息列表
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <!--                        <div style="width:320px; float: left;margin-left: 20px">
                                                <input ng-keyup="enterKey($event)" ng-model="searchContent" placeholder="名字/病人ID"  class="form-control input-sm" />
                                            </div>
                                            <button ng-click="getList()" style="float: left" class="btn btn-success btn-round btn-xs">搜索</button>
                                            <div style="clear: both"></div>-->
                </div>
                <div class="modal-body" style="height: 300px;overflow-y: auto">

                    <table style="width: 100%" class="table">
                        <tr>
                            <th style=""></th>
                            <th style="">序号</th>
                            <th>名称</th>

                            <!--                                <th>年龄</th>-->
                            <th>详情</th>
                            <th>时间</th>

                            <th>其他</th>

                        </tr>
                        <tr  ng-repeat="item in infoData">
                            <td > <input ng-model="item.flag" type="checkbox" /> </td>
                            <td ng-bind="$index"></td>
                            <td ng-bind="item.event_name"></td>

                            <td ng-bind="item.event_description"></td>
                            <td ng-bind="item.event_time"></td>

                            <td><button class="btn btn-success btn-xs">查看</button></td>

                        </tr>

                    </table>                                   

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">关闭</button>
                    <button  ng-click="sureData()"  type="button" class="btn btn-primary btn-sm"><span class="fa fa-save"></span>&nbsp;&nbsp;确定</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->


    <div class="modal fade mode-doctor" role="dialog" aria-labelledby="gridSystemModalLabel">
        <div class="modal-dialog  modal-lg " role="document">
            <div class="modal-content">
                <div class="modal-header">
                    医生列表
                </div>
                <div class="modal-body" style="height: 300px;overflow-y: auto">

                    <table style="width: 100%" class="table">
                        <tr>
                            <th style="">序号</th>
                            <th>名字</th>
                            <th>性别</th>
                            <!--                                <th>年龄</th>-->
                            <th>科室</th>

                        </tr>
                        <tr   ng-repeat="item in ds">
                            <td  ng-click="selectDoctor(item, $event)" ng-bind="$index"></td>
                            <td ng-click="selectDoctor(item, $event)" ng-bind="item.ch_name"></td>
                            <td ng-click="selectDoctor(item, $event)" ng-bind="item.gender"></td>
                            <td ng-click="selectDoctor(item, $event)" ng-bind="item.department_name"></td>

                        </tr>




                    </table>                                    


                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">关闭</button>
                    <!--<button  data-dismiss="modal" type="button" class="btn btn-primary btn-sm"><span class="fa fa-save"></span>&nbsp;&nbsp;确定</button>-->
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->


    <script type="text/javascript">
        var info = JSON.parse('<%= request.getAttribute("info")%>');
        var ask_code = '<%= request.getAttribute("ask_code")%>';
        var type = '<%= request.getAttribute("type")%>';

        //console.log(info);
        $(function () {
            var date = new Date();
            var year = date.getFullYear();
            var month = date.getMonth() + 1;
            var day = date.getDate();
            var dateStr = year + '-' + month + '-' + day;
            $("#nowDate").val(dateStr);
            if (type == 'create') {
                $('.manager_x').attr("disabled", true);
            } else if (type == 'manager') {
                $('.create_x').attr("disabled", true);
                //$('.manager_x').removeAttr("disabled");
            }
        });

        function autoClass(c, arr) {
            $("." + c).autocomplete({
                minLength: 0,
                source: arr,
                select: function (event, ui) {
                    if (c == "village") {
                        $(this).attr("data", ui.item.data);
                        autoClass("vCommission", tronsys.vCommissionList());
                    }
                }
            }).bind("click, focus", function () {
                thisObj = this;
                $(this).autocomplete("search");
                $(".ui-autocomplete").css({
                    "maxHeight": "268px",
                    "overflow": "hidden",
                    "overflow-y": "auto"
                });
            });
        }

        function autoClass(c, arr) {
            $(c).autocomplete({
                minLength: 0,
                source: arr,
                select: function (event, ui) {
                    if (c == "village") {
                        $(this).attr("data", ui.item.data);
                        autoClass("vCommission", tronsys.vCommissionList());
                    }
                }
            }).bind("click, focus", function () {
                thisObj = this;
                $(this).autocomplete("search");
                $(".ui-autocomplete").css({
                    "maxHeight": "268px",
                    "overflow": "hidden",
                    "overflow-y": "auto"
                });
            });
            $(c).focus();
        }

        function getDate(obj) {
            $(obj).datetimepicker({
                lang: "ch",
                format: "Y-m-d H:i",
                timepicker: true,
                onChangeDateTime: function (dp, $input) {
                    $input.trigger('input');
                }
            });
            $(obj).on('changer')
        }

        function printRpt() {
            $("#head").hide();
            $("#rpt").css("margin-top", "10px");
            window.print();
            $("#head").show();
            $("#rpt").css("margin-top", "80px");
//        var obj = document.getElementById('rpt');
//        var newWindow = window.open("打印窗口", "_blank");//打印窗口要换成页面的url
//        var docStr = obj.innerHTML;
//        newWindow.document.write(docStr);
//        newWindow.document.close();
//        newWindow.print();
//        newWindow.close();

        }


    </script>
</body>

</html>
